package io;

import java.io.BufferedOutputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.BufferOverflowException;

public class FlushDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("bos.txt");
        BufferedOutputStream bos = new BufferedOutputStream(fos);
        String line = "super idol 都没有你的笑容甜";
        byte[] data = line.getBytes();
        bos.write(data);
        bos.flush();// 缓冲区 flush一下
        System.out.println("复制完毕");
       bos.close();
    }
}
